<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>{SITE_TITLE} - {PAGE_TITLE}</title>
<link href="{SITE_URL}templates/{TPL_NAME}/images/style.css" type="text/css" rel="stylesheet">
<script language="JavaScript" type="text/JavaScript">
<!--
var http = createRequestObject();

function createRequestObject() 
{
	var ro;
	var browser = navigator.appName;
	if(browser == "Microsoft Internet Explorer")
	{
		ro = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else
	{
		ro = new XMLHttpRequest();
	}
	return ro;
}

function digResponse() 
{
	if(http.readyState == 4)
	{
        var response = http.responseText;
		
		returned = response.split('|');

		if(response.indexOf('|' != -1)) 
		{
			var id=returned[1];
			var numdigs=returned[2];
			var status=returned[0];
			
			if(status == '1')
			{
				document.getElementById('digbut'+id).innerHTML = '{LANG_DUGG}';
				document.getElementById('numdigs'+id).innerHTML = numdigs;
  			}
			else if(status == '2')
			{
				document.getElementById('digbut'+id).innerHTML = '{LANG_DUGG}';
			}
			else if(status == '0')
			{
				document.getElementById('digbut'+id).innerHTML = '<a href="{SITE_URL}login.php">{LANG_LOGIN}<\/a>';
			}
		}
    }
}

function buryResponse() 
{
	if(http.readyState == 4)
	{
        var response = http.responseText;
		
		returned = response.split('|');

		if(response.indexOf('|' != -1)) 
		{
			var id=returned[1];
			var status=returned[0];
			
			if(status == '0')
			{
				document.getElementById('digbut'+id).innerHTML = '<a href="{SITE_URL}login.php">{LANG_LOGIN}<\/a>';
			}
			else
			{
				document.getElementById('storyb'+id).style.filter = "Alpha(Opacity=80)";
				document.getElementById('storyb'+id).style.opacity = ".2";
				document.getElementById('digbut'+id).innerHTML = 'Buried';
				document.getElementById('storyb'+id).disabled = true;
			}
		}
	}
}

function dig(id)
{
	document.getElementById('digbut'+id).innerHTML = 'sending';

	http.open('get', '{SITE_URL}dig.php?i='+id);
    http.onreadystatechange = digResponse;
    http.send(null);
}

function bury_story(id)
{
	http.open('get', '{SITE_URL}bury.php?i='+id);
    http.onreadystatechange = buryResponse;
    http.send(null);
}

function inclickcheck(field,def,val)
{
	if(field.value == def)
	{
		field.value = val;
	}
}

function changeuser(field,but)
{
	if(field.value == '')
	{
		document.getElementById(but).disabled = true;
	}
	else
	{
		document.getElementById(but).disabled = false;
	}
}

function checkavail(field)
{
	username = document.getElementById(field).value;
	
	if(username.length < 4)
	{
		document.getElementById('availres').innerHTML = '{LANG_THEUSER} "'+username+'" {LANG_TOOSHORT}';
		return;
	}
	else if(username.length > 16)
	{
		document.getElementById('availres').innerHTML = '{LANG_THEUSER} "'+username+'" {LANG_TOOLONG}';
		return;
	}
	
	http.open('get', '{SITE_URL}signup.php?avail='+username);
    http.onreadystatechange = availResponse;
    http.send(null);
}

function availResponse() 
{
	if(http.readyState == 4)
	{
        var response = http.responseText;
		
		returned = response.split('|');

		if(response.indexOf('|' != -1)) 
		{
			var username=returned[0];
			var status=returned[1];

			if(status == 1)
			{
				document.getElementById('availres').innerHTML = '{LANG_THEUSER} "'+username+'" {LANG_ISAVAIL}';
			}
			else
			{
				document.getElementById('availres').innerHTML = '{LANG_SORRY}, {LANG_THEUSER} "'+username+'" {LANG_ISTAK}';
			}
		}
	}
}

function openWindow(theURL,winName,features) 
{
	window.open(theURL,winName,features);
}
//-->
</script>
<style type="text/css">
<!--
#tabsB 
{
	float:right;
	width:100%;
	background:#FFFFFF;
	font-size:93%;
	line-height:normal;
}
#tabsB ul 
{
	margin:0;
	padding:0px 10px 0 0px;
	list-style:none;
}
#tabsB li 
{
	display:inline;
	margin:0;
	padding:0;
}
#tabsB a 
{
	float:left;
	background:url("{SITE_URL}templates/simple/images/tableftB.gif") no-repeat left top;
	margin:0;	
	padding:0 0 0 4px;
	text-decoration:none;
}
#tabsB a span 
{
	float:left;
	display:block;
	background:url("{SITE_URL}templates/simple/images/tabrightB.gif") no-repeat right top;
	padding:5px 15px 4px 6px;
	color:#666;
}
#tabsB a span 
{
	float:none;
}
#tabsB a:hover span 
{
	color:#000;
}
#tabsB a:hover 
{
	background-position:0% -42px;
}
#tabsB a:hover span 
{
	background-position:100% -42px;
}
#tabsB #current a 
{
	background-position:0% -42px;
}
#tabsB #current a span 
{
	background-position:100% -42px;
}
.digbox
{
	background-image:url({SITE_URL}templates/{TPL_NAME}/images/digg_back.jpg);
}
-->
</style>
</head>

<body>
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="50" valign="top"><span class="headlogo"><a href="{SITE_URL}" class="headlogo">{SITE_TITLE}</a></span></td>
    <td width="200" align="right" valign="top"><form name="form1" method="get" action="{SITE_URL}search.php" style="padding:0px;margin:0px;">
      <input name="q" type="text" id="q" onfocus="inclickcheck(this,'Search','');" onblur="inclickcheck(this,'','Search');" value="Search">
      <input type="submit" name="Submit" value="Go">
        </form></td>
  </tr>
</table>
IF("{ANOUNCE}"=="1"){
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="8"><img src="{SITE_URL}templates/{TPL_NAME}/images/anounce_left.gif" width="8" height="32"></td>
    <td background="{SITE_URL}templates/{TPL_NAME}/images/anounce_back.gif"><span style="padding-left:10px;" class="anounce">{ANOUNCE_TEXT}</span></td>
    <td width="8"><img src="{SITE_URL}templates/{TPL_NAME}/images/anounce_right.gif" width="8" height="32"></td>
  </tr>
</table>
{:IF}
<br><br>